load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")

go_library(
    name = "go_default_library",
    srcs = [
        "block_metrics.go",
        "collector.go",
        "cpu_metrics.go",
        "dirty_rate_collector.go",
        "dirty_rate_metrics.go",
        "dirty_rate_scrapper.go",
        "domainstats.go",
        "filesystem_metrics.go",
        "memory_metrics.go",
        "network_metrics.go",
        "node_cpu_affinity_metrics.go",
        "scrapper.go",
        "unit_converter.go",
        "vcpu_metrics.go",
    ],
    importpath = "kubevirt.io/kubevirt/pkg/monitoring/metrics/virt-handler/domainstats",
    visibility = ["//visibility:public"],
    deps = [
        "//pkg/monitoring/metrics/virt-handler/collector:go_default_library",
        "//pkg/virt-handler/cmd-client:go_default_library",
        "//pkg/virt-launcher/virtwrap/stats:go_default_library",
        "//staging/src/kubevirt.io/api/core/v1:go_default_library",
        "//staging/src/kubevirt.io/client-go/log:go_default_library",
        "//vendor/github.com/machadovilaca/operator-observability/pkg/operatormetrics:go_default_library",
        "//vendor/k8s.io/client-go/tools/cache:go_default_library",
    ],
)

go_test(
    name = "go_default_test",
    srcs = [
        "block_metrics_test.go",
        "collector_test.go",
        "cpu_metrics_test.go",
        "dirty_rate_metrics_test.go",
        "domainstats_suite_test.go",
        "domainstats_test.go",
        "filesystem_metrics_test.go",
        "memory_metrics_test.go",
        "network_metrics_test.go",
        "node_cpu_affinity_metrics_test.go",
        "vcpu_metrics_test.go",
    ],
    embed = [":go_default_library"],
    deps = [
        "//pkg/monitoring/metrics/testing:go_default_library",
        "//pkg/monitoring/metrics/virt-handler/collector:go_default_library",
        "//pkg/virt-launcher/virtwrap/stats:go_default_library",
        "//staging/src/kubevirt.io/api/core/v1:go_default_library",
        "//staging/src/kubevirt.io/client-go/api:go_default_library",
        "//staging/src/kubevirt.io/client-go/testutils:go_default_library",
        "//vendor/github.com/machadovilaca/operator-observability/pkg/operatormetrics:go_default_library",
        "//vendor/github.com/onsi/ginkgo/v2:go_default_library",
        "//vendor/github.com/onsi/gomega:go_default_library",
        "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
    ],
)
